<?php
    function search($pageindex,$pagesize)
    {
        require("mysql_config.php");
        $db = new PDO("mysql:host={$dbhost};dbname={$dbname}","{$dbuid}","{$dbpwd}");
        $sql = "SELECT * FROM _Article limit ".($pageindex*$pagesize).",".($pagesize+1);
        $db->query("set names utf8;");
        $rs = $db->query($sql);
        $row = $rs->fetchAll(PDO::FETCH_ASSOC);
        return $row;
    }
?>
